package com.longge;

public class RemoveNodes {

    public ListNode removeNodes(ListNode head) {
        if (head == null) return head;

        ListNode node = removeNodes(head.next);
        if (node != null && node.val > head.val) {
            return node;
        }
        head.next = node;
        return head;

    }
}
